<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkMessageDialog</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
<link rel="home" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="WindowWidgets.html" title="Windows">
<link rel="prev" href="GtkInvisible.html" title="GtkInvisible">
<link rel="next" href="GtkWindow.html" title="GtkWindow">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="Builder.html" title="Interface builder">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="chapter" href="gtk-migrating-GtkBuilder.html" title="Migrating from libglade to GtkBuilder">
<link rel="chapter" href="gtk-migrating-tooltips.html" title="Migrating from GtkTooltips to GtkTooltip">
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="api-index-full.html" title="Index of all symbols">
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
<link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
<link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
<link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
<link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
<link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
<link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
<link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkInvisible.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="WindowWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkWindow.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkMessageDialog.synopsis" class="shortcut">Top</a>
                 | 
                <a href="#GtkMessageDialog.description" class="shortcut">Description</a>
                 | 
                <a href="#GtkMessageDialog.object-hierarchy" class="shortcut">Object Hierarchy</a>
                 | 
                <a href="#GtkMessageDialog.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                 | 
                <a href="#GtkMessageDialog.properties" class="shortcut">Properties</a>
                 | 
                <a href="#GtkMessageDialog.style-properties" class="shortcut">Style Properties</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkMessageDialog"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkMessageDialog.top_of_page"></a>GtkMessageDialog</span></h2>
<p>GtkMessageDialog — A convenient message window</p>
</td>
<td valign="top" align="right"><img src="messagedialog.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkMessageDialog.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;gtk/gtk.h&gt;

                    <a class="link" href="GtkMessageDialog.html#GtkMessageDialog-struct" title="GtkMessageDialog">GtkMessageDialog</a>;
enum                <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a>;
enum                <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a>;
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-new" title="gtk_message_dialog_new ()">gtk_message_dialog_new</a>              (<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,
                                                         <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a> flags,
                                                         <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a> type,
                                                         <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a> buttons,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-new-with-markup" title="gtk_message_dialog_new_with_markup ()">gtk_message_dialog_new_with_markup</a>  (<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,
                                                         <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a> flags,
                                                         <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a> type,
                                                         <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a> buttons,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);
void                <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-set-markup" title="gtk_message_dialog_set_markup ()">gtk_message_dialog_set_markup</a>       (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);
void                <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-set-image" title="gtk_message_dialog_set_image ()">gtk_message_dialog_set_image</a>        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *dialog,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *image);
<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *         <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-get-image" title="gtk_message_dialog_get_image ()">gtk_message_dialog_get_image</a>        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *dialog);
void                <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-format-secondary-text" title="gtk_message_dialog_format_secondary_text ()">gtk_message_dialog_format_secondary_text</a>
                                                        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);
void                <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-format-secondary-markup" title="gtk_message_dialog_format_secondary_markup ()">gtk_message_dialog_format_secondary_markup</a>
                                                        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                           +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
                                 +----<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
                                       +----<a class="link" href="GtkDialog.html" title="GtkDialog">GtkDialog</a>
                                             +----GtkMessageDialog
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkMessageDialog implements
 AtkImplementorIface and  <a class="link" href="gtk-gtkbuildable.html#GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--buttons" title='The "buttons" property'>buttons</a>"                  <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a>        : Write / Construct Only
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--image" title='The "image" property'>image</a>"                    <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*            : Read / Write
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--message-type" title='The "message-type" property'>message-type</a>"             <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a>        : Read / Write / Construct
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--secondary-text" title='The "secondary-text" property'>secondary-text</a>"           <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--secondary-use-markup" title='The "secondary-use-markup" property'>secondary-use-markup</a>"     <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--text" title='The "text" property'>text</a>"                     <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--use-markup" title='The "use-markup" property'>use-markup</a>"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.style-properties"></a><h2>Style Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--s-message-border" title='The "message-border" style property'>message-border</a>"           <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a class="link" href="GtkMessageDialog.html#GtkMessageDialog--s-use-separator" title='The "use-separator" style property'>use-separator</a>"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read
</pre>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.description"></a><h2>Description</h2>
<p>
<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> presents a dialog with an image representing the type of
message (Error, Question, etc.) alongside some message text. It's simply a
convenience widget; you could construct the equivalent of <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
from <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> without too much effort, but <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> saves typing.
</p>
<p>
The easiest way to do a modal message dialog is to use <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, though
you can also pass in the <a class="link" href="GtkDialog.html#GTK-DIALOG-MODAL--CAPS"><code class="literal">GTK_DIALOG_MODAL</code></a> flag, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> automatically
makes the dialog modal and waits for the user to respond to it. <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>
returns when any dialog button is clicked.
</p>
<div class="example">
<a name="id3190345"></a><p class="title"><b>Example 7. A modal dialog.</b></p>
<div class="example-contents"><pre class="programlisting">
 dialog = gtk_message_dialog_new (main_application_window,
                                  GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_ERROR,
                                  GTK_BUTTONS_CLOSE,
                                  "Error loading file '%s': %s",
                                  filename, g_strerror (errno));
 gtk_dialog_run (GTK_DIALOG (dialog));
 gtk_widget_destroy (dialog);
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
You might do a non-modal <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> as follows:
</p>
<div class="example">
<a name="id3164518"></a><p class="title"><b>Example 8. A non-modal dialog.</b></p>
<div class="example-contents"><pre class="programlisting">
 dialog = gtk_message_dialog_new (main_application_window,
                                  GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_ERROR,
                                  GTK_BUTTONS_CLOSE,
                                  "Error loading file '%s': %s",
                                  filename, g_strerror (errno));
 /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
 g_signal_connect_swapped (dialog, "response",
                           G_CALLBACK (gtk_widget_destroy),
                           dialog);
</pre></div>
</div>
<p><br class="example-break">
</p>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog-struct"></a><h3>GtkMessageDialog</h3>
<pre class="programlisting">typedef struct _GtkMessageDialog GtkMessageDialog;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageType"></a><h3>enum GtkMessageType</h3>
<pre class="programlisting">typedef enum
{
  GTK_MESSAGE_INFO,
  GTK_MESSAGE_WARNING,
  GTK_MESSAGE_QUESTION,
  GTK_MESSAGE_ERROR,
  GTK_MESSAGE_OTHER
} GtkMessageType;
</pre>
<p>
The type of message being displayed in the dialog.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-MESSAGE-INFO--CAPS"></a><span class="term"><code class="literal">GTK_MESSAGE_INFO</code></span></p></td>
<td>Informational message
</td>
</tr>
<tr>
<td><p><a name="GTK-MESSAGE-WARNING--CAPS"></a><span class="term"><code class="literal">GTK_MESSAGE_WARNING</code></span></p></td>
<td>Nonfatal warning message
</td>
</tr>
<tr>
<td><p><a name="GTK-MESSAGE-QUESTION--CAPS"></a><span class="term"><code class="literal">GTK_MESSAGE_QUESTION</code></span></p></td>
<td>Question requiring a choice
</td>
</tr>
<tr>
<td><p><a name="GTK-MESSAGE-ERROR--CAPS"></a><span class="term"><code class="literal">GTK_MESSAGE_ERROR</code></span></p></td>
<td>Fatal error message
</td>
</tr>
<tr>
<td><p><a name="GTK-MESSAGE-OTHER--CAPS"></a><span class="term"><code class="literal">GTK_MESSAGE_OTHER</code></span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkButtonsType"></a><h3>enum GtkButtonsType</h3>
<pre class="programlisting">typedef enum
{
  GTK_BUTTONS_NONE,
  GTK_BUTTONS_OK,
  GTK_BUTTONS_CLOSE,
  GTK_BUTTONS_CANCEL,
  GTK_BUTTONS_YES_NO,
  GTK_BUTTONS_OK_CANCEL
} GtkButtonsType;
</pre>
<p>
Prebuilt sets of buttons for the dialog. If
none of these choices are appropriate, simply use <a class="link" href="GtkMessageDialog.html#GTK-BUTTONS-NONE--CAPS"><code class="literal">GTK_BUTTONS_NONE</code></a>
then call <a class="link" href="GtkDialog.html#gtk-dialog-add-buttons" title="gtk_dialog_add_buttons ()"><code class="function">gtk_dialog_add_buttons()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-BUTTONS-NONE--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_NONE</code></span></p></td>
<td>no buttons at all
</td>
</tr>
<tr>
<td><p><a name="GTK-BUTTONS-OK--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_OK</code></span></p></td>
<td>an OK button
</td>
</tr>
<tr>
<td><p><a name="GTK-BUTTONS-CLOSE--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_CLOSE</code></span></p></td>
<td>a Close button
</td>
</tr>
<tr>
<td><p><a name="GTK-BUTTONS-CANCEL--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_CANCEL</code></span></p></td>
<td>a Cancel button
</td>
</tr>
<tr>
<td><p><a name="GTK-BUTTONS-YES-NO--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_YES_NO</code></span></p></td>
<td>Yes and No buttons
</td>
</tr>
<tr>
<td><p><a name="GTK-BUTTONS-OK-CANCEL--CAPS"></a><span class="term"><code class="literal">GTK_BUTTONS_OK_CANCEL</code></span></p></td>
<td>OK and Cancel buttons
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-new"></a><h3>gtk_message_dialog_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_message_dialog_new              (<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,
                                                         <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a> flags,
                                                         <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a> type,
                                                         <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a> buttons,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);</pre>
<p>
Creates a new message dialog, which is a simple dialog with an icon
indicating the dialog type (error, warning, etc.) and some text the
user may want to see. When the user clicks a button a "response"
signal is emitted with response IDs from <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>. See
<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> for more details.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td> transient parent, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> for none 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> flags
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> type of message
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buttons</code></em> :</span></p></td>
<td> set of buttons to use
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_format</code></em> :</span></p></td>
<td> <code class="function">printf()</code>-style format string, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> arguments for <em class="parameter"><code>message_format</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-new-with-markup"></a><h3>gtk_message_dialog_new_with_markup ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_message_dialog_new_with_markup  (<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a> *parent,
                                                         <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a> flags,
                                                         <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a> type,
                                                         <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a> buttons,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);</pre>
<p>
Creates a new message dialog, which is a simple dialog with an icon
indicating the dialog type (error, warning, etc.) and some text which
is marked up with the <a
href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html"
>Pango text markup language</a>.
When the user clicks a button a "response" signal is emitted with
response IDs from <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>. See <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> for more details.
</p>
<p>
Special XML characters in the <code class="function">printf()</code> arguments passed to this
function will automatically be escaped as necessary.
(See <a
href="/usr/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html#g-markup-printf-escaped"
><code class="function">g_markup_printf_escaped()</code></a> for how this is implemented.)
Usually this is what you want, but if you have an existing
Pango markup string that you want to use literally as the
label, then you need to use <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-set-markup" title="gtk_message_dialog_set_markup ()"><code class="function">gtk_message_dialog_set_markup()</code></a>
instead, since you can't pass the markup string either
as the format (it might contain '%' characters) or as a string
argument.
</p>
<div class="informalexample"><pre class="programlisting">
 GtkWidget *dialog;
 dialog = gtk_message_dialog_new (main_application_window,
                                  GTK_DIALOG_DESTROY_WITH_PARENT,
                                  GTK_MESSAGE_ERROR,
                                  GTK_BUTTONS_CLOSE,
                                  NULL);
 gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
                                markup);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td> transient parent, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a> for none 
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> flags
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> type of message
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buttons</code></em> :</span></p></td>
<td> set of buttons to use
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_format</code></em> :</span></p></td>
<td> <code class="function">printf()</code>-style format string, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> arguments for <em class="parameter"><code>message_format</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-set-markup"></a><h3>gtk_message_dialog_set_markup ()</h3>
<pre class="programlisting">void                gtk_message_dialog_set_markup       (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *str);</pre>
<p>
Sets the text of the message dialog to be <em class="parameter"><code>str</code></em>, which is marked
up with the <a
href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html"
>Pango text markup
language</a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_dialog</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td> markup string (see <a
href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html"
>Pango markup format</a>)
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-set-image"></a><h3>gtk_message_dialog_set_image ()</h3>
<pre class="programlisting">void                gtk_message_dialog_set_image        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *dialog,
                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *image);</pre>
<p>
Sets the dialog's image to <em class="parameter"><code>image</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dialog</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td> the image
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.10</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-get-image"></a><h3>gtk_message_dialog_get_image ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *         gtk_message_dialog_get_image        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *dialog);</pre>
<p>
Gets the dialog's image.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dialog</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the dialog's image

</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-format-secondary-text"></a><h3>gtk_message_dialog_format_secondary_text ()</h3>
<pre class="programlisting">void                gtk_message_dialog_format_secondary_text
                                                        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);</pre>
<p>
Sets the secondary text of the message dialog to be <em class="parameter"><code>message_format</code></em> 
(with <code class="function">printf()</code>-style).
</p>
<p>
Note that setting a secondary text makes the primary text become
bold, unless you have provided explicit markup.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_dialog</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_format</code></em> :</span></p></td>
<td> <code class="function">printf()</code>-style format string, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> arguments for <em class="parameter"><code>message_format</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="gtk-message-dialog-format-secondary-markup"></a><h3>gtk_message_dialog_format_secondary_markup ()</h3>
<pre class="programlisting">void                gtk_message_dialog_format_secondary_markup
                                                        (<a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a> *message_dialog,
                                                         const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *message_format,
                                                         ...);</pre>
<p>
Sets the secondary text of the message dialog to be <em class="parameter"><code>message_format</code></em> (with 
<code class="function">printf()</code>-style), which is marked up with the 
<a
href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html"
>Pango text markup language</a>.
</p>
<p>
Note that setting a secondary text makes the primary text become
bold, unless you have provided explicit markup.
</p>
<p>
Due to an oversight, this function does not escape special XML characters
like <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-new-with-markup" title="gtk_message_dialog_new_with_markup ()"><code class="function">gtk_message_dialog_new_with_markup()</code></a> does. Thus, if the arguments 
may contain special XML characters, you should use <a
href="/usr/share/gtk-doc/html/glib/glib-Simple-XML-Subset-Parser.html#g-markup-printf-escaped"
><code class="function">g_markup_printf_escaped()</code></a>
to escape it.
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
gchar *msg;
 
msg = g_markup_printf_escaped (message_format, ...);
gtk_message_dialog_format_secondary_markup (message_dialog, "%s", msg);
g_free (msg);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_dialog</code></em> :</span></p></td>
<td> a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message_format</code></em> :</span></p></td>
<td> <code class="function">printf()</code>-style markup string (see 
     <a
href="/usr/share/gtk-doc/html/pango/PangoMarkupFormat.html"
>Pango markup format</a>), or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL--CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> arguments for <em class="parameter"><code>message_format</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.property-details"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--buttons"></a><h3>The <code class="literal">"buttons"</code> property</h3>
<pre class="programlisting">  "buttons"                  <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a>        : Write / Construct Only</pre>
<p>The buttons shown in the message dialog.</p>
<p>Default value: GTK_BUTTONS_NONE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--image"></a><h3>The <code class="literal">"image"</code> property</h3>
<pre class="programlisting">  "image"                    <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*            : Read / Write</pre>
<p>
The image for this dialog.</p>
<p>
</p>
<p>Since 2.10</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--message-type"></a><h3>The <code class="literal">"message-type"</code> property</h3>
<pre class="programlisting">  "message-type"             <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a>        : Read / Write / Construct</pre>
<p>
The type of the message. The type is used to determine
the image that is shown in the dialog, unless the image is
explicitly set by the ::image property.</p>
<p>
</p>
<p>Default value: GTK_MESSAGE_INFO</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--secondary-text"></a><h3>The <code class="literal">"secondary-text"</code> property</h3>
<pre class="programlisting">  "secondary-text"           <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write</pre>
<p>
The secondary text of the message dialog.</p>
<p>
</p>
<p>Default value: NULL</p>
<p>Since 2.10</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--secondary-use-markup"></a><h3>The <code class="literal">"secondary-use-markup"</code> property</h3>
<pre class="programlisting">  "secondary-use-markup"     <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if the secondary text of the dialog includes Pango markup. 
See <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#pango-parse-markup"
><code class="function">pango_parse_markup()</code></a>.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.10</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--text"></a><h3>The <code class="literal">"text"</code> property</h3>
<pre class="programlisting">  "text"                     <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a>*                : Read / Write</pre>
<p>
The primary text of the message dialog. If the dialog has 
a secondary text, this will appear as the title.</p>
<p>
</p>
<p>Default value: ""</p>
<p>Since 2.10</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--use-markup"></a><h3>The <code class="literal">"use-markup"</code> property</h3>
<pre class="programlisting">  "use-markup"               <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>
<a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE--CAPS"
><code class="literal">TRUE</code></a> if the primary text of the dialog includes Pango markup. 
See <a
href="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#pango-parse-markup"
><code class="function">pango_parse_markup()</code></a>.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.10</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--s-message-border"></a><h3>The <code class="literal">"message-border"</code> style property</h3>
<pre class="programlisting">  "message-border"           <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>Width of border around the label and image in the message dialog.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 12</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="GtkMessageDialog--s-use-separator"></a><h3>The <code class="literal">"use-separator"</code> style property</h3>
<pre class="programlisting">  "use-separator"            <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read</pre>
<p>
Whether to draw a separator line between the message label and the buttons
in the dialog.</p>
<p>
</p>
<p>Default value: FALSE</p>
<p>Since 2.4</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="GtkMessageDialog.see-also"></a><h2>See Also</h2>
<p>
<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.11</div>
</body>
</html>
